import './style.pcss';
import '../utils/common';

const $ = require('jquery');
const $topbar = $('.topbar');

$(() => {

  const scrollTop = document.documentElement.scrollTop;
  if (scrollTop > 100) {
    $topbar.addClass('fixed');
  }

  $(window).on('scroll', () => {
    const scrollTop = $(window).scrollTop();
    if (scrollTop > 100) {
      $topbar.addClass('fixed');
    } else {
      $topbar.removeClass('fixed');
    }
  });
});
